<!-- Modal -->
<div class="modal-dialog wide" style="width: 550px;">
    <div class="modal-content">
        <div class="modal-header">
            <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
            <h4 class="modal-title" id="myModalLabel">
            <#if ambBylmxb??>
                <#if ambBylmxb.id??>
                    编辑
                <#else>
                    新增
                </#if>
            </#if>
            </h4>
        </div>
        <div class="modal-body">
            <div id="errorMessage"><#include "../../message.ftl" /></div>
            <form class="form-horizontal" role="form" id="ambBylmxbForm" method="post"
                  action="${absoluteContextPath}/amb/ambBylmxb/save">
            <#if ambBylmxb??>
                <#if ambBylmxb.id??>
                    <input type="hidden" name="id" value="${ambBylmxb.id}"/>
                <#else>
                    <input type="hidden" name="id" value=""/>
                </#if>
            </#if>
                <div class="row">
                    <div class="form-group col-md-12">
                        <label class="col-sm-4 control-label"></label>

                        <div class="col-sm-6">
                            <input name="id" value="${ambBylmxb.id!''}" type="text" class="form-control"/>
                        </div>
                    </div>
                    <div class="form-group col-md-12">
                        <label class="col-sm-4 control-label">下单日期</label>

                        <div class="col-sm-6">
                            <input name="billDate" value="${ambBylmxb.billDate!''}" type="text" class="form-control"/>
                        </div>
                    </div>
                    <div class="form-group col-md-12">
                        <label class="col-sm-4 control-label">客户姓名</label>

                        <div class="col-sm-6">
                            <input name="customerName" value="${ambBylmxb.customerName!''}" type="text"
                                   class="form-control"/>
                        </div>
                    </div>
                    <div class="form-group col-md-12">
                        <label class="col-sm-4 control-label">种类</label>

                        <div class="col-sm-6">
                            <input name="species" value="${ambBylmxb.species!''}" type="text" class="form-control"/>
                        </div>
                    </div>
                    <div class="form-group col-md-12">
                        <label class="col-sm-4 control-label">产品名称</label>

                        <div class="col-sm-6">
                            <input name="productName" value="${ambBylmxb.productName!''}" type="text"
                                   class="form-control"/>
                        </div>
                    </div>
                    <div class="form-group col-md-12">
                        <label class="col-sm-4 control-label">开卡日期</label>

                        <div class="col-sm-6">
                            <input name="openStart" value="${ambBylmxb.openStart!''}" type="text" class="form-control"/>
                        </div>
                    </div>
                    <div class="form-group col-md-12">
                        <label class="col-sm-4 control-label">结束日期</label>

                        <div class="col-sm-6">
                            <input name="dueStart" value="${ambBylmxb.dueStart!''}" type="text" class="form-control"/>
                        </div>
                    </div>
                    <div class="form-group col-md-12">
                        <label class="col-sm-4 control-label">渠道</label>

                        <div class="col-sm-6">
                            <input name="channel" value="${ambBylmxb.channel!''}" type="text" class="form-control"/>
                        </div>
                    </div>
                    <div class="form-group col-md-12">
                        <label class="col-sm-4 control-label">金额</label>

                        <div class="col-sm-6">
                            <input name="money" value="${ambBylmxb.money!''}" type="text" class="form-control"/>
                        </div>
                    </div>
                    <div class="form-group col-md-12">
                        <label class="col-sm-4 control-label">引荐人</label>

                        <div class="col-sm-6">
                            <input name="yjrName" value="${ambBylmxb.yjrName!''}" type="text" class="form-control"/>
                        </div>
                    </div>
                    <div class="form-group col-md-12">
                        <label class="col-sm-4 control-label">促会人</label>

                        <div class="col-sm-6">
                            <input name="chrName" value="${ambBylmxb.chrName!''}" type="text" class="form-control"/>
                        </div>
                    </div>
                    <div class="form-group col-md-12">
                        <label class="col-sm-4 control-label">分管人</label>

                        <div class="col-sm-6">
                            <input name="fgrName" value="${ambBylmxb.fgrName!''}" type="text" class="form-control"/>
                        </div>
                    </div>
                    <div class="form-group col-md-12">
                        <label class="col-sm-4 control-label"></label>

                        <div class="col-sm-6">
                            <input name="openEnd" value="${ambBylmxb.openEnd!''}" type="text" class="form-control"/>
                        </div>
                    </div>
                    <div class="form-group col-md-12">
                        <label class="col-sm-4 control-label"></label>

                        <div class="col-sm-6">
                            <input name="dueEnd" value="${ambBylmxb.dueEnd!''}" type="text" class="form-control"/>
                        </div>
                    </div>
                    <div class="form-group col-md-12">
                        <label class="col-sm-4 control-label"></label>

                        <div class="col-sm-6">
                            <input name="cardId" value="${ambBylmxb.cardId!''}" type="text" class="form-control"/>
                        </div>
                    </div>
                    <div class="form-group col-md-12">
                        <label class="col-sm-4 control-label"></label>

                        <div class="col-sm-6">
                            <input name="cardNo" value="${ambBylmxb.cardNo!''}" type="text" class="form-control"/>
                        </div>
                    </div>
                    <div class="form-group col-md-12">
                        <label class="col-sm-4 control-label"></label>

                        <div class="col-sm-6">
                            <input name="ambId" value="${ambBylmxb.ambId!''}" type="text" class="form-control"/>
                        </div>
                    </div>
                    <div class="form-group col-md-12">
                        <label class="col-sm-4 control-label"></label>

                        <div class="col-sm-6">
                            <input name="diimType" value="${ambBylmxb.diimType!''}" type="text" class="form-control"/>
                        </div>
                    </div>
                </div>
            </form>
        </div>
        <div class="modal-footer">
            <button type="button" class="btn btn-default" data-dismiss="modal" aria-hidden="true">关闭</button>
            <button type="button" class="btn btn-primary" onclick="save();">保存</button>
        </div>
    </div>
</div>
<script>
    function save() {
        $("#" + "ambBylmxbForm").ajaxSubmit({
            success: function (data) {
                data = JSON.parse(data);
                if (data.returnCode == 1) {
                    $('#myModal').modal("hide");
                    $.showMessage({parentId: "showMessage", message: "信息保存成功！", type: "success"});
                    refreshTable();
                } else {
                    $.showMessage({parentId: "errorMessage", message: "<strong>错误信息</strong>：" + data.returnMsg, type: "error"});
                }
            }
        });
    }
</script>